package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.ProductUnitService;
import com.atguigu.spzx.model.entity.product.ProductUnit;
import com.atguigu.spzx.model.vo.common.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LT
 * @create 2024-03-18-21:10
 */
@RestController
@RequestMapping("/admin/product/productUnit")
@Tag(name = "商品单位管理")
public class ProductUnitController {

    @Resource
    ProductUnitService productUnitService;

    @GetMapping("/findAll")
    public Result list(){
        List<ProductUnit> productUnits = productUnitService.list();
        return Result.ok(productUnits);
    }

}
